package vg.modules.notepad.components.textComponent;

import java.util.Map;
import java.util.Observer;

import javax.swing.JComponent;

/**
 * This interface determine methods for text component, which developer may use
 * in notepad or other palce.
 * @author tzolotuhin
 */
public interface ITextComponent {
	/**
	 * This method sets current text.
	 */
	public void setText(String text);
	/**
	 * This method appends text to end.
	 */
	//public void append(String text);
	/**
	 * This method sets current text size.
	 */
	public void setTextSize(final int size);
	/**
	 * This method sets text bold.
	 */
	public void setTextBold(final boolean bold);
	/**
	 * This method returns column number.
	 */
	public int getColumnNumber();
	/**
	 * This method returns line number.
	 */
	public int getLineNumber();
	/**
	 * This method returns view.
	 */
	public JComponent getView();
	/**
	 * This method updates ui theme;
	 */
	public void updateUITheme();
	/**
	 * This method adds new observer.
	 */
	public void addObserver(Observer o);
	/**
	 * This method deletes all observers.
	 */
	public void deleteAllObservers();
	/**
	 * This method deletes the observer.
	 */
	public void deleteObserver(Observer o);
	/**
	 * This method finds string, which equals string 'whatFind'.
	 */
	public Map<Integer, Integer> find(String whatFind);
	/**
	 * This method selects the anchor.
	 */
	public void selectAnchor(final String anchor);
}
